﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminIndexMaster.master" AutoEventWireup="true" CodeFile="Admin_AddInterface.aspx.cs" Inherits="Admin_Admin_AddInterface" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

           <asp:FormView ID="FormView1" runat="server" DataKeyNames="InterfaceID" DataSourceID="ObjectDataSource1" Width="100%" CellSpacing="2" 
           Font-Size="13px" HorizontalAlign="Center" DefaultMode="Edit" OnItemUpdated="FormView1_ItemUpdated" OnItemInserted="FormView1_ItemInserted">
                      <HeaderTemplate>
                      <table width="100%" class="nick">                      
                          <tr>
                               <td colspan="2" class="tit"><b>整合接口设置</b></td>              
                          </tr>
                      </HeaderTemplate>                     
                      <InsertItemTemplate>
                          
                          <tr>
                               <td class="ltd"> 接口系统名称:</td>
                               <td class="rtd"> <asp:TextBox ID="InterfaceNameTextBox" runat="server" Text='<%# Bind("InterfaceName") %>' Width="70%" CssClass="text_area" />
                               <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="InterfaceNameTextBox" ErrorMessage="请填写系统名称" />
                               </td>
                          </tr>
                           <tr>
                               <td class="ltd">系统版本</td>
                               <td class="rtd"><asp:TextBox ID="Version" runat="server" Text='<%# Bind("Version") %>' Width="70%" CssClass="text_area" />
                               <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="Version" ErrorMessage="请填写系统版本" />
                               </td>
                          </tr>                          
                           <tr>
                               <td class="ltd">接口更新日期 :</td>
                               <td class="rtd"><asp:TextBox ID="UpdateTime" runat="server" Text='<%# Bind("UpdateTime") %>' Width="70%" CssClass="text_area" />
                               <asp:RequiredFieldValidator runat="server" ID="gh" ControlToValidate="UpdateTime" ErrorMessage="请填写更新日期"></asp:RequiredFieldValidator>
                               </td>
                          </tr>                          
                         
                          <tr>
                               <td class="ltd">前台接口路径 :</td>
                               <td class="rtd"><asp:TextBox ID="InterfaceFrontUrlTextBox" runat="server" Text='<%# Bind("InterfaceFrontUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help3');" onmouseout="hidenHelp('help3');" ><img src="Images/tooltip.png" border="0" /></a>
                               <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="InterfaceFrontUrlTextBox" ErrorMessage="请填写前台接口路径" />
                               </td>
                          </tr>
                          <tr>
                               <td class="ltd">后台接口路径 :</td>
                               <td class="rtd"><asp:TextBox ID="InterfaceAdminUrlTextBox" runat="server" Text='<%# Bind("InterfaceAdminUrl") %>' Width="70%" CssClass="text_area" />
                               <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="InterfaceAdminUrlTextBox" ErrorMessage="请填写后台接口路径" />
                               </td>
                          
                          </tr>
                           <tr>
                               <td class="ltd">后台登录帐号 :</td>
                               <td class="rtd"><asp:TextBox ID="AdminLoginUrl" runat="server" Text='<%# Bind("AdminLoginUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help2');" onmouseout="hidenHelp('help2');" ><img src="Images/tooltip.png" border="0" /></a>
                               <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator6" ControlToValidate="AdminLoginUrl" ErrorMessage="请填写后台登录帐号" />
                               </td>
                          </tr>
                           <tr>
                               <td class="ltd">后台登录密码 :</td>
                               <td class="rtd"><asp:TextBox ID="AdminLoginPass" runat="server" Text='<%# Bind("AdminLoginPassword") %>' Width="70%" CssClass="text_area" />
                               <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator7" ControlToValidate="AdminLoginPass" ErrorMessage="请填写后台登录密码" />
                               </td>
                          </tr>
                          <tr>
                              <td class="ltd">后台打开方式</td>
                              <td class="rtd"><asp:RadioButtonList ID="AdminLoginOpenType" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Bind("AdminLoginOpenType") %>'>
                                       <asp:ListItem Text="新窗口" Value="0" />
                                       <asp:ListItem Text="原窗口" Value="1" Selected="True"/>
                                    </asp:RadioButtonList></td>
                          </tr>                         
                          <tr>
                               <td class="ltd">会员中心路径 :</td>
                               <td class="rtd"><asp:TextBox ID="UserCenterUrl" runat="server" Text='<%# Bind("UserCenterUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help1');" onmouseout="hidenHelp('help1');" ><img src="Images/tooltip.png" border="0" /></a></td>
                          
                          </tr>
                          <tr>
                               <td class="ltd">系统字符编码 :</td>
                               <td class="rtd">
                               <asp:DropDownList ID="CodePage" runat="server" SelectedValue='<%# Bind("CodePage") %>' >
                                   <asp:ListItem Text="gb2312" Value="gb2312"></asp:ListItem>
                                   <asp:ListItem Text="utf-8" Value="utf-8"></asp:ListItem>
                                   <asp:ListItem Text="默认" Value=""></asp:ListItem>
                               </asp:DropDownList>可以向程序提供商联系获知，默认值为GB2312。
                               </td>
                          </tr>
                           <tr>
                               <td class="ltd">开启前台整合:</td>
                               <td class="rtd"><asp:RadioButtonList ID="EnableFrontInterfaceRadio" runat="server" 
                                     SelectedValue='<%# Bind("EnableFrontInterface") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                   </asp:RadioButtonList>
                               </td>
                          </tr>
                          <tr>
                               <td class="ltd">开启后台整合:</td>
                               <td class="rtd"><asp:RadioButtonList ID="EnableAdminInterfaceRadio" runat="server" 
                                     SelectedValue='<%# Bind("EnableAdminInterface") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                   </asp:RadioButtonList>                               
                              </td>
                          </tr>
                          <tr>
                               <td class="ltd">关闭同步注册:</td>
                               <td class="rtd"><asp:RadioButtonList ID="RegCloseRadio" runat="server" 
                                     SelectedValue='<%# Bind("RegClose") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                               <td class="ltd"> 关闭同步登录:</td>
                               <td class="rtd"><asp:RadioButtonList ID="LoginCloseRadio" runat="server" 
                                     SelectedValue='<%# Bind("LoginClose") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                               <td class="ltd">是否为跨域名接口:</td>
                               <td class="rtd"><asp:RadioButtonList ID="CrossDomain" runat="server" 
                                     SelectedValue='<%# Bind("CrossDomain") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                               <td colspan="2" style="text-align:center"> 
                               <asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="添 加"/>                              
                                <asp:Button ID="ImageButton3" runat="server" CommandName="Cancel" OnClientClick="javascript:{history.back();}" CausesValidation="false" Text="返 回"  />
                              </td>                               
                          </tr>  
                      </InsertItemTemplate>
                      <EditItemTemplate>
                            <tr>
                                <td class="ltd"> 接口ID:</td>
                                <td class="rtd"> <%# Eval("InterfaceID") %></td>
                            </tr>
                            <tr>
                                <td class="ltd">接口系统名称: </td>
                                <td class="rtd"><asp:TextBox ID="InterfaceNameTextBox" runat="server" Text='<%# Bind("InterfaceName") %>' Width="70%" CssClass="text_area" />
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="InterfaceNameTextBox" ErrorMessage="请填写系统名称"></asp:RequiredFieldValidator>
                               </td>
                            </tr>
                            <tr>
                                <td class="ltd">系统版本: </td>
                                <td class="rtd"><asp:TextBox ID="Version" runat="server" Text='<%# Bind("Version") %>' Width="70%" CssClass="text_area" /></td>
                            </tr>
                            <tr>
                                <td class="ltd">接口更新日期: </td>
                                <td class="rtd"><asp:TextBox ID="UpdateTime" runat="server" Text='<%# Bind("UpdateTime") %>' Width="70%" CssClass="text_area" />
                                <asp:RequiredFieldValidator runat="server" ID="gh" ControlToValidate="UpdateTime" ErrorMessage="请填写更新日期"></asp:RequiredFieldValidator>
                               </td>
                            </tr>
                            <tr>
                                <td class="ltd">前台接口路径 : </td>
                                <td class="rtd"><asp:TextBox ID="InterfaceFrontUrlTextBox" runat="server" Text='<%# Bind("InterfaceFrontUrl") %>' Width="70%"  CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help3');" onmouseout="hidenHelp('help3');" ><img src="Images/tooltip.png" border="0" /></a></td>
                            </tr>
                           <tr>
                               <td class="ltd">后台接口路径 :</td>
                               <td class="rtd"><asp:TextBox ID="InterfaceAdminUrlTextBox" runat="server" Text='<%# Bind("InterfaceAdminUrl") %>' Width="70%" CssClass="text_area" /></td>
                          
                          </tr>
                           <tr>
                               <td class="ltd">后台登录帐号 :</td>
                               <td class="rtd"><asp:TextBox ID="AdminLoginUrl" runat="server" Text='<%# Bind("AdminLoginUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help2');" onmouseout="hidenHelp('help2');" ><img src="Images/tooltip.png" border="0" /></a></td>
                          </tr>
                           <tr>
                               <td class="ltd">后台登录密码 :</td>
                               <td class="rtd"><asp:TextBox ID="AdminLoginPass" runat="server" OnDataBinding="ReplacePassWord" Text='<%# Bind("AdminLoginPassword") %>' Width="70%" CssClass="text_area" /> 不修改请留空。</td>
                          </tr>
                          <tr>
                              <td class="ltd">后台打开方式</td>
                              <td class="rtd"><asp:RadioButtonList ID="AdminLoginOpenType" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Bind("AdminLoginOpenType") %>'>
                                       <asp:ListItem Text="新窗口" Value="0" />
                                       <asp:ListItem Text="原窗口" Value="1" Selected="True"/>
                                    </asp:RadioButtonList></td>
                          </tr>        
                          <tr>
                               <td class="ltd">该系统会员中心路径 :</td>
                               <td class="rtd"><asp:TextBox ID="UserCenterUrl" runat="server" Text='<%# Bind("UserCenterUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help1');" onmouseout="hidenHelp('help1');" ><img src="Images/tooltip.png" border="0" /></a></td>
                          
                          </tr>
                          <tr>
                               <td class="ltd">系统字符编码 :</td>
                               <td class="rtd">
                               <asp:DropDownList ID="CodePage" runat="server" SelectedValue='<%# Bind("CodePage") %>' >
                                   <asp:ListItem Text="gb2312" Value="gb2312"></asp:ListItem>
                                   <asp:ListItem Text="utf-8" Value="utf-8"></asp:ListItem>
                                   <asp:ListItem Text="默认" Value=""></asp:ListItem>
                               </asp:DropDownList>可以向程序提供商联系获知，默认值为GB2312。
                               </td>
                          </tr>
                           <tr>
                               <td class="ltd">开启前台整合:</td>
                               <td class="rtd"><asp:RadioButtonList ID="EnableFrontInterfaceRadio" runat="server"
                                     SelectedValue='<%# Bind("EnableFrontInterface") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>
                               </td>
                          </tr>
                          <tr>
                               <td class="ltd">开启后台整合:</td>
                               <td class="rtd"><asp:RadioButtonList ID="EnableAdminInterfaceRadio" runat="server" 
                                     SelectedValue='<%# Bind("EnableAdminInterface") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                               
                              </td>
                          </tr>
                          <tr>
                               <td class="ltd">关闭同步注册:</td>
                               <td class="rtd"><asp:RadioButtonList ID="RegCloseRadio" runat="server" 
                                     SelectedValue='<%# Bind("RegClose") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                               <td class="ltd">关闭同步登录:</td>
                               <td class="rtd"><asp:RadioButtonList ID="LoginCloseRadio" runat="server" 
                                     SelectedValue='<%# Bind("LoginClose") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                           <tr>
                               <td class="ltd"> 是否为跨域名接口:</td>
                               <td class="rtd"><asp:RadioButtonList ID="CrossDomain" runat="server" 
                                     SelectedValue='<%# Bind("CrossDomain") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                              <td colspan="2" class="btm"> 
                                  <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                                   Text="修 改"/>
                                  <asp:Button ID="UpdateCancelButton" OnClientClick="javascript:{history.back();}" runat="server" CausesValidation="False" CommandName="Cancel"
                                    Text="返 回"/>
                               </td>
                          </tr>
                      </EditItemTemplate>                      
                      <FooterTemplate>
                      </table>
                      </FooterTemplate>
                      <PagerSettings Mode="NumericFirstLast" />                     
                      <RowStyle Font-Size="Large" />
                      <PagerStyle Font-Size="Large" Font-Strikeout="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                      
                  </asp:FormView> 
           
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DelInterface"
        InsertMethod="AddInterface" SelectMethod="GetInterfaceByInterfaceID" TypeName="HKB.Web.InterfaceBll"
        UpdateMethod="UpdateInterface"  OnInit="ObjectDataSource1_Init1" OnUpdating="FormView1_ItemUpdating">
        <DeleteParameters>
            <asp:Parameter Name="InterfaceID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="InterfaceID" Type="Int32" />
            <asp:Parameter Name="EnableAdminInterface" Type="Int32" />
            <asp:Parameter Name="EnableFrontInterface" Type="Int32" />
            <asp:Parameter Name="AdminLoginOpenType" Type="Int32" />
            <asp:Parameter Name="AdminLoginPassword" Type="String" />
            <asp:Parameter Name="AdminLoginUrl" Type="String" />
            <asp:Parameter Name="InterfaceAdminUrl" Type="String" />
            <asp:Parameter Name="InterfaceFrontUrl" Type="String" />
            <asp:Parameter Name="InterfaceName" Type="String" />
            <asp:Parameter Name="InterfaceType" Type="Int32" />
            <asp:Parameter Name="CodePage" Type="String" />
            <asp:Parameter Name="LoginClose" Type="Int32" />
            <asp:Parameter Name="RegClose" Type="Int32" />
            <asp:Parameter Name="UpdateTime" Type="DateTime" />
            <asp:Parameter Name="Version" Type="String" />
            <asp:Parameter Name="CrossDomain" Type="Int32" />
            <asp:Parameter Name="UserCenterUrl" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="InterfaceID" QueryStringField="InterfaceID" Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="EnableAdminInterface" Type="Int32" />
            <asp:Parameter Name="EnableFrontInterface" Type="Int32" />
            <asp:Parameter Name="AdminLoginOpenType" Type="Int32" />
            <asp:Parameter Name="AdminLoginPassword" Type="String" />
            <asp:Parameter Name="AdminLoginUrl" Type="String" />
            <asp:Parameter Name="InterfaceAdminUrl" Type="String" />
            <asp:Parameter Name="InterfaceFrontUrl" Type="String" />
            <asp:Parameter Name="InterfaceName" Type="String" />
            <asp:Parameter Name="InterfaceType" Type="Int32" />
            <asp:Parameter Name="CodePage" Type="String" />
            <asp:Parameter Name="LoginClose" Type="Int32" />
            <asp:Parameter Name="RegClose" Type="Int32" />
            <asp:Parameter Name="UpdateTime" Type="DateTime" />
            <asp:Parameter Name="Version" Type="String" />
            <asp:Parameter Name="CrossDomain" Type="Int32" />
            <asp:Parameter Name="UserCenterUrl" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>
    
     <div id="help1" style="position:absolute;z-index:1; border:solid 1px black; padding:10px; background:white; display:none;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
        添加会员地址用于在首页显示该系统的会员页面，不填则显示空白页面。 
     </div>
      <div id="help2" style="position:absolute;z-index:1; border:solid 1px black; padding:10px; background:white; display:none;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
        填写该系统的管理员帐号和密码用于该系统的后台整合，不填则后台整合不起作用。
     </div>
     <div id="help3" style="position:absolute;z-index:1; border:solid 1px black; padding:10px; background:white; display:none;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
        需要填写接口的完整URL路径，如http://域名/interface.asp 请不要填写相对路径
     </div>

</asp:Content>

